package com.atguigu.security.config;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * 2.0之后版本独有的需要处理密码
 * @author admin
 * @create 2020-06-27 22:21
 */
public class MyPasswordEncoder implements PasswordEncoder {
    @Override
    public String encode(CharSequence charSequence) {
        return charSequence.toString();
    }

    @Override
    public boolean matches(CharSequence charSequence, String s) {
        return s.equals(charSequence.toString());
    }
}
